home *** CD-ROM | disk | FTP | other *** search
- <?xml version="1.0" encoding="utf-8"?>
- <!-- ===========================================================
- Category: XSLT
- Sub-category: xsl:output
- Author: David Silverlight
- HeadGeek@xmlpitstop.com
- Created: 2001-05-16
- Description:-
- This stylesheet processes a set of XML elements and creates
- a resulting text file. This is accomplished using the
- output method of Text as shown above. In this example,
- we are taking the original xml elements and creating
- delimited text document sorted by name.
- =============================================================== -->
- <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
-
- <!-- Note: The following XSLT method is required to specify the output type of Text -->
- <xsl:output method="text"/>
-
-
-
- <!-- Template for root rule -->
- <xsl:template match="/">
- <xsl:apply-templates/>
- </xsl:template>
-
-
- <!-- Template for "employees" elements -->
- <xsl:template match="employees">
- <!--This stylesheet processes a set of XML elements and
- creates a resulting text file. This is accomplished using the output method of Text as
- shown above. In this example, we are taking the original xml elements and
- creating delimited text document sorted by name-->
- <xsl:for-each select="employee" >
- <xsl:sort select="employeename" order="ascending" />
- <xsl:value-of select="department" />;<xsl:value-of select="employeename" />;<xsl:value-of select="hourlyrate" />;<xsl:value-of select="primarylanguage" />|
- </xsl:for-each>
-
- </xsl:template>
-
-
-
- </xsl:stylesheet>